package com.wrupple.muba.catalogs.client.cms.service.impl;

import com.google.inject.Inject;
import com.google.inject.Provider;
import com.wrupple.muba.catalogs.client.activity.process.UniversalCatalogSelectionProcess;
import com.wrupple.muba.catalogs.client.cms.service.CatalogManagementSystem;
import com.wrupple.muba.catalogs.client.cms.service.CatalogManager;
import com.wrupple.muba.catalogs.client.module.services.logic.GenericCatalogManager;
import com.wrupple.muba.catalogs.domain.JsCatalogKey;

public class GenericCatalogManagementSystem implements
		CatalogManagementSystem {

	Provider<GenericCatalogManager> provider;
	private Provider<UniversalCatalogSelectionProcess> universalSelectionProvider;

	@Inject
	public GenericCatalogManagementSystem(
			Provider<GenericCatalogManager> provider, Provider<UniversalCatalogSelectionProcess> universalSelectionProvider) {
		super();
		this.provider = provider;
		this.universalSelectionProvider=universalSelectionProvider;
	}


	@Override
	public UniversalCatalogSelectionProcess getUniversalSelectionProcess() {
		
		
		
		return universalSelectionProvider.get();
	}


	@Override
	public CatalogManager<JsCatalogKey> getContentManager(String catalog) {
		GenericCatalogManager cms = this.provider.get();
		cms.setManagedCatalog(catalog);
		CatalogManager regreso = cms;
		return regreso;
	}

	
}
